-- GENERATED SPELL FOR [Lord Malathrom] --


function spell0_503(pUnit, Event) --@Minions of Malathrom,Self--
pUnit:FullCastSpellOnTarget(3537,pUnit)
pUnit:RegisterEvent('Sorts_503', 1000, 1)
end

function spell1_503(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(2767,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_503', 18000, 1)
end

function Sorts_503(pUnit, Event)
local choix_sorts_503 = math.random(0, 1)
if choix_sorts_503 == 0 then
pUnit:RegisterEvent('spell0_503', 1, 1)
end
if choix_sorts_503 == 1 then
pUnit:RegisterEvent('spell1_503', 1, 1)
end
end

function mob503_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_503', math.random(1500, 3000), 1)
end

function mob503_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob503_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob503_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(503, 1, 'mob503_Action')
RegisterUnitEvent(503, 2, 'mob503_Leave')
RegisterUnitEvent(503, 3, 'mob503_Kill')
RegisterUnitEvent(503, 4, 'mob503_Die')
